package com.yuyou.hxyy.service.api.mapper;

import com.yuyou.hxyy.service.api.entity.UserWordUnit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserWordUnitMapper {
    int deleteByPrimaryKey(Long userWordUnitId);

    int insert(UserWordUnit record);

    UserWordUnit selectByPrimaryKey(Long userWordUnitId);

    int updateByPrimaryKeySelective(UserWordUnit record);

    void deleteByRepoIds(@Param(value = "repoIds") String repoIds);

    void deleteByUnitIds(@Param(value = "unitIds") String unitIds);

    Integer getLearnedCountByRepo(@Param(value = "repoId")Long repoId, @Param(value = "userId")Long userId);

    UserWordUnit getByRepoUnitUserId(@Param(value = "wordRepoId")Long wordRepoId, @Param(value = "wordUnitId")Long wordUnitId, @Param(value = "userId")Long userId);

}